It is well known to use fixed or hard disk drives to store information for processing in a processing unit connected to a main memory. Information is stored on disks according to a predetermined pattern of cylinders and sectors, each sector containing a predetermined number of bytes. A drive includes plural heads, there being one head for each side of a disk on which data is stored. Data is read from a disk one sector at a time. In order to access a desired sector, a head must first be moved to the cylinder containing the desired sector, the disk rotated past the head until the desired sector is reached and then the sector is read and the contents placed in a buffer. In looking at the total amount of time required to access data on a disk, the principal delay occurs during the physical movement of a head. Thus, when processing involves a large amount of I/0 activity, it is highly desirable to reduce the degree of head movement as much as possible to achieve improved performance.
DASD caching is a known technique and provides a way to improve system performance by reducing the amount of head movement and physical I/O activity. In accordance with such technique, a portion of main memory is used as a cache for storing pages of sectors of data. When a desired sector is initially accessed, not only that sector but one or more additional nearby sectors are read into the cache and subsequent accesses to such sectors is done at main memory speeds instead of at disk drive speeds. The improvement in performance comes about because of the probability that the next data to be processed is stored near data that has been previously processed.
One problem that is known in the art, arises because of the fact that defects exist in the disk storage media. Thus, sectors containing such defects are considered bad and cannot be used. Such bad sectors are normally identified by formatting and later uses thereof avoided by simply skipping a bad sector. The problem becomes more complex in caching systems because when a good sector is initially read into the cache, nearby sectors of the same page may contain errors or be bad. Within the prior art known to us, this problem has been solved in two ways. First, any page containing a bad sector is itself considered bad and an error signal or message is sent to the user. Second, the disk controller can be constructed so that only good sectors are sent to the cache. Such solution is a hardware solution and is relatively complex and costly to accomplish. The present invention is directed to a method that can be readily implemented by software or programming to provide an effective low cost solution particularly useful in relatively low cost, high performance personal computers.